<% add_decidim_page_title(t("decidim.forms.admin.questionnaires.edit.title")) %>

<div class="questionnaire-questions">
  <div class="item_show__header">
    <h1 class="item_show__header-title">
      <%= t("decidim.forms.admin.questionnaires.edit_questions.title") %>
        <% if questionnaire.questions_editable? %>
          <button class="button button__sm button__secondary add-question"><%= t(".add_question") %></button>
          <button class="button button__sm button__secondary add-separator"><%= t(".add_separator") %></button>
          <button class="button button__sm button__secondary add-title-and-description"><%= t(".add_title_and_description") %></button>
        <% end %>
    </h1>
  </div>
</div>

<div class="item__edit item__edit-1col">
  <div class="item__edit-form">
    <%= decidim_form_for(@form, url: update_questions_questionnaire_template_path(template), method: :patch, html: { class: "form-defaults form edit_questions_survey" }) do |form| %>
      <%= render partial: "decidim/forms/admin/questionnaires/questions_form", object: form %>
      <div class="item__edit-sticky">
        <div class="item__edit-sticky-container">
          <%= form.submit t("save", scope: "decidim.forms.admin.questionnaires.edit"), class: "button button__sm button__secondary" %>
        </div>
      </div>
    <% end %>
  </div>
</div>
